package com.ruoyi.yyq.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.yyq.mapper.CarGroupBuyingMapper;
import com.ruoyi.yyq.domain.CarGroupBuying;
import com.ruoyi.yyq.service.ICarGroupBuyingService;

/**
 * 优惠团购Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-05-13
 */
@Service
public class CarGroupBuyingServiceImpl implements ICarGroupBuyingService 
{
    @Autowired
    private CarGroupBuyingMapper carGroupBuyingMapper;

    /**
     * 查询优惠团购
     * 
     * @param id 优惠团购主键
     * @return 优惠团购
     */
    @Override
    public CarGroupBuying selectCarGroupBuyingById(Long id)
    {
        return carGroupBuyingMapper.selectCarGroupBuyingById(id);
    }

    /**
     * 查询优惠团购列表
     * 
     * @param carGroupBuying 优惠团购
     * @return 优惠团购
     */
    @Override
    public List<CarGroupBuying> selectCarGroupBuyingList(CarGroupBuying carGroupBuying)
    {
        return carGroupBuyingMapper.selectCarGroupBuyingList(carGroupBuying);
    }

    /**
     * 新增优惠团购
     * 
     * @param carGroupBuying 优惠团购
     * @return 结果
     */
    @Override
    public int insertCarGroupBuying(CarGroupBuying carGroupBuying)
    {
        return carGroupBuyingMapper.insertCarGroupBuying(carGroupBuying);
    }

    /**
     * 修改优惠团购
     * 
     * @param carGroupBuying 优惠团购
     * @return 结果
     */
    @Override
    public int updateCarGroupBuying(CarGroupBuying carGroupBuying)
    {
        return carGroupBuyingMapper.updateCarGroupBuying(carGroupBuying);
    }

    /**
     * 批量删除优惠团购
     * 
     * @param ids 需要删除的优惠团购主键
     * @return 结果
     */
    @Override
    public int deleteCarGroupBuyingByIds(Long[] ids)
    {
        return carGroupBuyingMapper.deleteCarGroupBuyingByIds(ids);
    }

    /**
     * 删除优惠团购信息
     * 
     * @param id 优惠团购主键
     * @return 结果
     */
    @Override
    public int deleteCarGroupBuyingById(Long id)
    {
        return carGroupBuyingMapper.deleteCarGroupBuyingById(id);
    }
}
